package org.lt.resume.controller.subcompany;

import java.util.List;

import org.apache.struts2.json.annotations.JSON;
import org.lt.resume.service.subcompanyserviceInterface.SubCompanyServiceInterface;

import com.opensymphony.xwork2.ActionSupport;

public class SearchSubCompanyController extends ActionSupport{

    /** **/
	private static final long serialVersionUID = 6346132294815072090L;

	private SubCompanyServiceInterface subCompanyService; 

	private List items;

	private String currentPage;

	@Override
	public String execute() throws Exception {

		int currentNumber = Integer.valueOf(currentPage);
		items = subCompanyService.searchSubCompanyInfo(currentNumber);
		return SUCCESS;

	}

	@JSON(name="items")
	public List getItems() {
		return items;
	}

	public void setItems(List items) {
		this.items = items;
	}

	public void setCurrentPage(String currentPage) {
		this.currentPage = currentPage;
	}

	public void setSubCompanyService(SubCompanyServiceInterface subCompanyService) {
		this.subCompanyService = subCompanyService;
	}
}
